<?php
namespace demo;
/**
*
*/
date_default_timezone_set('PRC');

interface Pay{
	public function setPara();
	public function doPay();
	public function notice();
}

interface Log{
	public function writeLog();
}


/**
*支付宝支付
*/
class aliPay implements Pay,Log
{

	function __construct()
	{
		# code...
	}
	public function setPara(){
		echo "设置支付参数";
	}
	public function doPay(){
		echo "发起支付";
	}
	public function notice(){
		echo "回调支付";
	}
	public function writeLog(){
		echo "日志写入成功";
	}


}


/**
* 微信支付
*/
class wePay implements Pay
{

	function __construct()
	{
		# code...
	}
	public function setPara(){}
	public function doPay(){}
	public function notice(){}



}

$pay = new aliPay();
$pay -> setPara();
echo "<br />";
$pay -> doPay();
echo "<br />";
$pay -> notice();
echo "<br />";
$pay -> writeLog();

?>
